<template>
  <div class="main">
    <el-container class="main-container">
      <el-aside :width="isFold ? '60px' : '200px'">
        <NavMenu :isFold="isFold" />
      </el-aside>
      <el-container class="page">
        <el-header class="page-header">
          <NavHeader @clickFold="clickFold" />
        </el-header>
        <el-main class="page-container">
          <div class="page-info">
            <router-view></router-view>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script lang="ts" setup>
import NavMenu from '@/components/nav-menu/nav-menu.vue';
import NavHeader from '@/components/nav-header/nav-header.vue';
import { ref } from 'vue';
import { RouterView } from 'vue-router';
const isFold = ref(false);
const clickFold = (value: boolean) => {
  isFold.value = value;
};
</script>

<style scoped lang="less">
.main {
  width: 100%;
  height: 100%;
  .main-container {
    height: 100%;
    background-color: rgba(214, 220, 227, 0.596);
    .page-header {
      border-bottom: 1px solid sienna;
    }
    .page-info {
      background-color: snow;
      border-radius: 5px;
    }
  }
  .el-aside {
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 200px;
    text-align: left;
    cursor: pointer;
    // background-color: #001529;
    transition: width 0.3s linear;
    scrollbar-width: none;
    -ms-overflow-style: none;
    &::-webkit-scrollbar {
      display: none;
    }
  }
}
</style>
